package com.zhiquan.cai.service;

import com.zhiquan.cai.entity.User;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;

import java.util.List;

public interface UserService {

    /**
     * 根据Username查找用户
     * @return
     */
    public User findByUsername(String username);

    /**
     * 保存用户信息
     * @param user
     * @return
     */
    public void userAdd(User user);

    /**
     * 分页显示用户信息
     * @param pageable
     * @return
     */
    Page<User> userGetAll(Pageable pageable);
}
